package com.xxg.fileshand.net

import com.xxg.fileshand.bean.*
import com.xxg.fileshand.greendao.CaseCodeDTO
import com.xxg.fileshand.greendao.CaseNoDTO
import com.xxg.fileshand.greendao.FilesInfoDTO
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST

/**
 * Create by Sxl on 2021/12/22. java
 */
interface ApiService {

    @GET("cd/common-data/oss/config/getAliyunPolicyParams")
    suspend fun testUrl():BaseResponse<TestBean>

    @GET("cd/common-data/oss/config/getAliyunPolicyParams1")
    suspend fun testUrl1():BaseResponse<TestBean>

    //登录
    @JvmSuppressWildcards
    @POST("login")
    suspend fun login(@Body map: Map<String, Any>): BaseResponse<LoginResponse>

    //档案上架数据上传
    @JvmSuppressWildcards
    @POST("api/WZ/UpWZ")
    suspend fun upWZ(@Body map: Map<String, Any>): EmptyResponse

    //档案下架数据上传
    @JvmSuppressWildcards
    @POST("api/WZ/DownBook")
    suspend fun downWZ(@Body map: Map<String, Any>): EmptyResponse

    //档案倒架数据上传
    @JvmSuppressWildcards
    @POST("api/WZ/ChangeWZ")
    suspend fun changeWZ(@Body map: Map<String, Any>): EmptyResponse

    //获取档案信息
    @JvmSuppressWildcards
    @POST("api/WZ/SearchWZ")
    suspend fun searchWZ(@Body map: Map<String, Any>): SearchWZResponse

    //获取层位下档案数量和层位翻译码
    @JvmSuppressWildcards
    @POST("api/WZ/WZCaseSum")
    suspend fun wzCaseSum(@Body map: Map<String, Any>): CaseSumResponse?

    //获取盘点任务
    @JvmSuppressWildcards
    @POST("api/WZ/PDTask")
    suspend fun pdTask(): InventoryTaskResponse

    //盘点记录上传
    @JvmSuppressWildcards
    @POST("api/WZ/UpInventroyResult")
    suspend fun upInventroyResult(@Body body: PDTaskRequest): EmptyResponse

    //借阅/归还  人查询
    @JvmSuppressWildcards
    @POST("api/WZ/SearchRead")
    suspend fun searchRead(@Body map: Map<String, Any>): SearchReadResponse

    //异常	　返回值result为 -9
    //档案出入库
    @JvmSuppressWildcards
    @POST("api/WZ/WZBorrowBank")
    suspend fun wzBorrowBank(@Body map: Map<String, Any>): EmptyResponse

    //离线档案数据下载
    @JvmSuppressWildcards
    @POST("api/DisWZ/InitDisWZ")
    suspend fun initDisWZ(@Body map: Map<String, Any>): InitWzInfoResponse

    //离线层位数据下载
    @JvmSuppressWildcards
    @POST("api/DisWZ/InitDisWZCase")
    suspend fun initDisWZCase(@Body map: Map<String, Any>): InitCaseNoResponse

    //离线用户数据下载
    @JvmSuppressWildcards
    @POST("api/DisWZ/InitDisSysUser")
    suspend fun initDisSysUser(@Body map: Map<String, Any>): InitDataUserResponse

    @JvmSuppressWildcards
    @POST("api/DisWZ/InitDisRead")
    suspend fun IInitDisRead(@Body map: Map<String, Any>): InitDisReadResponse


//    --------------------------

    //档案盘点 盘点层位识别
    @JvmSuppressWildcards
    @POST("check/reqCaseCheck")
    suspend fun checkCaseCheck(@Body map: Map<String, Any>): BaseResponse<CaseCheckResponse>

    //档案盘点 盘点层位保存
    @JvmSuppressWildcards
    @POST("check/caseCheckSave")
    suspend fun checkCheckSave(@Body body: PDRequest): BaseResponse<EmptyResponse>

    //档案识别
    @JvmSuppressWildcards
    @POST("guidance/archiveReq")
    suspend fun guidanceArchiveReq(@Body map: Map<String, Any>): BaseResponse<FilesSearchResponse>

    //档案上架 上架目标层位识别
    @JvmSuppressWildcards
    @POST("onShelves/reqCaseCode")
    suspend fun onReqCaseCode(@Body map: Map<String, Any>): BaseResponse<CaseCodeDTO>

    //档案上架 档案识别
    @JvmSuppressWildcards
    @POST("onShelves/reqArchive")
    suspend fun onArchive(@Body map: Map<String, Any>): BaseResponse<FilesSearchResponse>

    //档案上架 上架操作
    @JvmSuppressWildcards
    @POST("onShelves/saveInfo")
    suspend fun onSaveInfo(@Body map: Map<String, Any>): BaseResponse<EmptyResponse>

    //档案下架 档案识别
    @JvmSuppressWildcards
    @POST("offShelves/reqArchive")
    suspend fun offArchive(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案下架 下架操作
    @JvmSuppressWildcards
    @POST("offShelves/saveInfo")
    suspend fun offSaveInfo(@Body map: Map<String, Any>): BaseResponse<EmptyResponse>

    //档案入库 归还人验证
    @JvmSuppressWildcards
    @POST("inbound/reqReturnedInfo")
    suspend fun inboundReturnedInfo(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案入库 档案识别
    @JvmSuppressWildcards
    @POST("inbound/reqArchive")
    suspend fun inboundArchive(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案入库 入库操作
    @JvmSuppressWildcards
    @POST("inbound/saveInfo")
    suspend fun inboundSaveInfo(@Body map: Map<String, Any>): BaseResponse<EmptyResponse>

    //档案出库 借阅人验证
    @JvmSuppressWildcards
    @POST("outbound/validReader")
    suspend fun outboundValidReader(@Body map: Map<String, Any>): BaseResponse<ValidReaderResponse>

    //档案出库 档案识别
    @JvmSuppressWildcards
    @POST("outbound/reqArchive")
    suspend fun outboundArchive(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案出库 出库操作
    @JvmSuppressWildcards
    @POST("outbound/saveInfo")
    suspend fun outboundSaveInfo(@Body map: Map<String, Any>): BaseResponse<EmptyResponse>

    //档案倒架 目标层位识别
    @JvmSuppressWildcards
    @POST("moveShelf/reqCaseCode")
    suspend fun moveCaseCode(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案倒架 档案识别
    @JvmSuppressWildcards
    @POST("moveShelf/reqArchive")
    suspend fun moveArchive(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案倒架 倒架操作
    @JvmSuppressWildcards
    @POST("moveShelf/saveInfo")
    suspend fun moveSaveInfo(@Body map: Map<String, Any>): BaseResponse<EmptyResponse>

    //档案倒架 整层识别
    @JvmSuppressWildcards
    @POST("moveShelf/reqFromCase")
    suspend fun moveFromCase(@Body map: Map<String, Any>): BaseResponse<Any>

    //档案查找 查询档号/题名
    @JvmSuppressWildcards
    @POST("findArchive/reqArchive")
    suspend fun findArchive(@Body map: Map<String, Any>): FileFindListResponse

    //层位同步
    @JvmSuppressWildcards
    @POST("sync/case")
    suspend fun syncCase(@Body map: Map<String, Any>): BaseResponse<SyncCaseResopnse>

    //离线用户同步
    @JvmSuppressWildcards
    @POST("sync/user")
    suspend fun syncUser(@Body map: Map<String, Any>): BaseResponse<SyncUserResopnse>

    //离线档案同步 sync/archive
    @JvmSuppressWildcards
    @POST("sync/archive")
    suspend fun syncFiles(@Body map: Map<String, Any>): BaseResponse<FilesSearchResponse>

    //借阅人员同步
    @JvmSuppressWildcards
    @POST("sync/user")
    suspend fun syncBorrow(@Body map: Map<String, Any>): BaseResponse<SyncBorrowResponse>

    @JvmSuppressWildcards
    @POST("/shelving/action")
    suspend fun shelvingAction(@Body map: Map<String, Any>): BaseResponse<SyncBorrowResponse>



}